/**
 * ArticleEntityImpl.java 上午9:43:34 2012-5-1
 * Cyber Information Technology Co.,Ltd.
 *   
 *   http://www.citchina.cn
 *   citchina.org@gmail.com
 */
package cn.cit.wcif.article.persistence.jpa.entity;

import java.sql.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Version;

import cn.cit.wcif.article.api.persistence.IArticleEntity;

/**
 * @author Jonathan
 * @version 1.0
 * 
 */
@Entity
@Table(name = "ARTICLE")
@NamedQueries({ @NamedQuery(name = "Article.findAll", query = "select a from ArticleEntityImpl a"), })
public class ArticleEntityImpl implements IArticleEntity {
	@Id
	@GeneratedValue
	private long id;
	@Column(length = 400)
	private String contentName;
	@Column
	private long publishUserID;
	@Column
	private Date publishDate;
	@Column
	private long chID;
	@Column(length = 2000)
	private String introduction;
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "ARTICLE_CONTENT", nullable = true)
	private String content;
	@Column(length = 2000)
	private String recommend;
	@Column
	private Date updateTime;
	@Column
	private long updateUserID;
	@Column(length = 300)
	private String infoSrc;
	@Column(length = 400)
	private String contentKey;
	@Column(length = 3)
	private String contentState;
	@Column(length = 800)
	private String backReason;
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "ARTICLE_CONTENT_ZHAIYAO", nullable = true)
	private String contentZhaiyao;
	@Column
	private Date recommendTime;
	@Column(length = 50)
	private String lang;

	@Version
	private int version;

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getId()
	 */
	@Override
	public long getId() {
		return this.id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getContentName()
	 */
	@Override
	public String getContentName() {
		return this.contentName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#getPublishUserID()
	 */
	@Override
	public long getPublishUserID() {
		return this.publishUserID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getPublishDate()
	 */
	@Override
	public Date getPublishDate() {
		return this.publishDate;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getChID()
	 */
	@Override
	public long getChID() {
		return this.chID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getIntroduction()
	 */
	@Override
	public String getIntroduction() {
		return this.introduction;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getContent()
	 */
	@Override
	public String getContent() {
		return this.content;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getRecommend()
	 */
	@Override
	public String getRecommend() {
		return this.recommend;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getUpdateTime()
	 */
	@Override
	public Date getUpdateTime() {
		return this.updateTime;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getUpdateUserID()
	 */
	@Override
	public long getUpdateUserID() {
		return this.updateUserID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getInfoSrc()
	 */
	@Override
	public String getInfoSrc() {
		return this.infoSrc;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getContentKey()
	 */
	@Override
	public String getContentKey() {
		return this.contentKey;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getContentState()
	 */
	@Override
	public String getContentState() {
		return this.contentState;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getBackReason()
	 */
	@Override
	public String getBackReason() {
		return this.backReason;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#getContentZhaiyao()
	 */
	@Override
	public String getContentZhaiyao() {
		return this.contentZhaiyao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#getRecommendTime()
	 */
	@Override
	public Date getRecommendTime() {
		return this.recommendTime;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#getLang()
	 */
	@Override
	public String getLang() {
		return this.lang;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#setId(long)
	 */
	@Override
	public void setId(long id) {
		this.id = id;

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setContentName(java
	 * .lang.String)
	 */
	@Override
	public void setContentName(String contentName) {
		this.contentName = contentName;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setPublishUserID(java
	 * .lang.String)
	 */
	@Override
	public void setPublishUserID(long publishUserID) {
		this.publishUserID = publishUserID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setPublishDate(java
	 * .sql.Date)
	 */
	@Override
	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see cn.cit.wcif.article.api.persistence.IArticleEntity#setChID(long)
	 */
	@Override
	public void setChID(long chID) {
		this.chID = chID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setIntroduction(java
	 * .lang.String)
	 */
	@Override
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setContent(java.lang
	 * .String)
	 */
	@Override
	public void setContent(String content) {
		this.content = content;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setRecommend(java.
	 * lang.String)
	 */
	@Override
	public void setRecommend(String recommend) {
		this.recommend = recommend;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setUpdateTime(java
	 * .sql.Date)
	 */
	@Override
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setUpdateUserID(long)
	 */
	@Override
	public void setUpdateUserID(long updateUserID) {
		this.updateUserID = updateUserID;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setInfoSrc(java.lang
	 * .String)
	 */
	@Override
	public void setInfoSrc(String infoSrc) {
		this.infoSrc = infoSrc;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setContentKey(java
	 * .lang.String)
	 */
	@Override
	public void setContentKey(String contentKey) {
		this.contentKey = contentKey;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setContentState(java
	 * .lang.String)
	 */
	@Override
	public void setContentState(String contentState) {
		this.contentState = contentState;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setBackReason(java
	 * .lang.String)
	 */
	@Override
	public void setBackReason(String backReason) {
		this.backReason = backReason;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setContentZhaiyao(
	 * java.lang.String)
	 */
	@Override
	public void setContentZhaiyao(String contentZhaiyao) {
		this.contentZhaiyao = contentZhaiyao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setRecommendTime(java
	 * .sql.Date)
	 */
	@Override
	public void setRecommendTime(Date recommendTime) {
		this.recommendTime = recommendTime;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * cn.cit.wcif.article.api.persistence.IArticleEntity#setLang(java.lang.
	 * String)
	 */
	@Override
	public void setLang(String lang) {
		this.lang = lang;
	}

	/**
	 * @return the version
	 */
	public int getVersion() {
		return version;
	}

	/**
	 * @param version
	 *            the version to set
	 */
	public void setVersion(int version) {
		this.version = version;
	}

}
